package com.ruoyi.project.zerocarbon.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.project.zerocarbon.mapper.DeclareExternalOrganizationMapper;
import com.ruoyi.project.zerocarbon.domain.DeclareExternalOrganization;
import com.ruoyi.project.zerocarbon.service.IDeclareExternalOrganizationService;

/**
 * 外部支持机构团队信息Service业务层处理
 * 
 * @author ruoyi
 * @date 2022-03-13
 */
@Service
public class DeclareExternalOrganizationServiceImpl implements IDeclareExternalOrganizationService 
{
    @Autowired
    private DeclareExternalOrganizationMapper declareExternalOrganizationMapper;

    /**
     * 查询外部支持机构团队信息
     * 
     * @param id 外部支持机构团队信息ID
     * @return 外部支持机构团队信息
     */
    @Override
    public DeclareExternalOrganization selectDeclareExternalOrganizationById(Long id)
    {
        return declareExternalOrganizationMapper.selectDeclareExternalOrganizationById(id);
    }

    /**
     * 查询外部支持机构团队信息列表
     * 
     * @param declareExternalOrganization 外部支持机构团队信息
     * @return 外部支持机构团队信息
     */
    @Override
    public List<DeclareExternalOrganization> selectDeclareExternalOrganizationList(DeclareExternalOrganization declareExternalOrganization)
    {
        return declareExternalOrganizationMapper.selectDeclareExternalOrganizationList(declareExternalOrganization);
    }

    /**
     * 新增外部支持机构团队信息
     * 
     * @param declareExternalOrganization 外部支持机构团队信息
     * @return 结果
     */
    @Override
    public int insertDeclareExternalOrganization(DeclareExternalOrganization declareExternalOrganization)
    {
        declareExternalOrganization.setCreateTime(DateUtils.getNowDate());
        return declareExternalOrganizationMapper.insertDeclareExternalOrganization(declareExternalOrganization);
    }

    /**
     * 修改外部支持机构团队信息
     * 
     * @param declareExternalOrganization 外部支持机构团队信息
     * @return 结果
     */
    @Override
    public int updateDeclareExternalOrganization(DeclareExternalOrganization declareExternalOrganization)
    {
        declareExternalOrganization.setUpdateTime(DateUtils.getNowDate());
        return declareExternalOrganizationMapper.updateDeclareExternalOrganization(declareExternalOrganization);
    }

    /**
     * 批量删除外部支持机构团队信息
     * 
     * @param ids 需要删除的外部支持机构团队信息ID
     * @return 结果
     */
    @Override
    public int deleteDeclareExternalOrganizationByIds(Long[] ids)
    {
        return declareExternalOrganizationMapper.deleteDeclareExternalOrganizationByIds(ids);
    }

    /**
     * 删除外部支持机构团队信息信息
     * 
     * @param id 外部支持机构团队信息ID
     * @return 结果
     */
    @Override
    public int deleteDeclareExternalOrganizationById(Long id)
    {
        return declareExternalOrganizationMapper.deleteDeclareExternalOrganizationById(id);
    }
}
